package com.msmall.community.vote.action.html;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.tiles.AttributeContext;
import org.apache.tiles.context.TilesRequestContext;
import org.apache.tiles.preparer.ViewPreparer;

import com.msmall.community.ApplicationManager;
import com.msmall.community.vote.model.VoteModule;
import com.msmall.community.vote.service.VoteManager;

public class TravelPreparer implements ViewPreparer{

	public void execute(TilesRequestContext tilesContext, AttributeContext context) {
		HttpServletRequest request = (HttpServletRequest) tilesContext.getRequest();
		VoteManager vm = (VoteManager) ApplicationManager.appContext.getBean("voteManager");
		List<VoteModule> list = vm.getTravelVote();
		request.setAttribute("voteTravelList", list);
	}

}
